package com.avocado.base.service;

import com.avocado.base.dto.user.*;
import com.avocado.base.vo.SimpleUser;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.avocado.base.entity.User;

import java.util.List;

public interface UserService {


    User getOne(Long id);
	
    Long add(UserAddDto t)throws Exception;
   
    void update(UserEditDto dto)throws Exception;

    Page<User> findByPage(Pageable pageable, UserQueryDto dto);
   
    Boolean deleteById(Long id);
	
    User findByName(String name);

    List<User> findByRoleName(String code);

    void updatePassword(String newPassword, String userName)throws Exception;

    void updateProfile(UserProfileDto dto, String userName);

    List<SimpleUser> findAllExceptName(String name, String likeName);


    void updatePhoto(String photo,String userName);

    Boolean isWeChatUserExist(String openId);

    List<SimpleUser> findAllByRoleCode(String code);

}
